from quote.base.operationbrowser import OperationBrowser
from quote.base.userbrowser import UseBrowser


class Chaxunmanager:
    def __init__(self):

        self.ob=OperationBrowser(UseBrowser.driver)
    def chaxun(self,customerNO):
        self.ob.change_frame("Links")
        self.ob.click_name("xpath", '//*[@id="Bar_panel0_b1"]/img')
        self.ob.change_frame("main")
        self.ob.input_text_name("name","customerNO",customerNO)
        self.ob.click_name("name", "saveButton")
    def huoqu(self):
        return self.ob.get_text_xpath('/html/body/center/form/table[1]/tbody/tr[2]/td[1]')


    # def get_data(self):
    #     lst=[]
    #     for row in range(2,7):
    #         lst_row=[]
    #         for col in range(1,7):
    #             v=self.ob.get_text_xpath('/html/body/center/form/table[1]/tbody/tr[{}]/td[{}]'.format(row,col))
    #             lst_row.append(v)
    #         lst.append(lst_row)
    #     for i in range(1,5):
    #         lst=[]
    #         tavle=self.ob.get_element_XPATH()
    #         tr_lst=self.ob.get_tag_name(tavle,'rt')
    #         for tr_element in tr_lst:
    #             for td_element in self.ob.get_tag_name(tr_element,'td'):
    #                 td_element






